package com.ahau.Ribbon;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author xiao hu die
 * @Date 2021/12/5 21:53
 * @Version 1.0
 */
@Configuration
public class MyRuler {
    @Bean
    /**引入自己定义的随机负载均衡*/
    public IRule myRuler(){
     return  new RandomRule();
    }
}
